<template>
    <div class="bet-card">
      <div class="bet-title">{{ title }}</div>
      <div class="bet-content">
        <ul class="number">
          <li
            v-for="(item, index) in ['合大', '合小', '合单', '合双']"
            :key="`number-${index}`"
            :class="{ active: selectedNumber.includes(item) }"
            @click="changeSelectNumber(item)"
          >
            <span>{{ item }}</span>
            <span class="rate">{{ rateList[item] }}</span>
          </li>
        </ul>
      </div>
    </div>
  </template>
  
  <script>
  export default {
    name: "arrow-animate",
    props: {
      title: {
        default: "",
        type: String,
      },
      style: {},
    },
    data() {
      return {
        selectedNumber: "合小",
        rateList: {
          合大: "2.08",
          合小: "1.72",
          合单: "1.9",
          合双: "1.9",
        },
      };
    },
    methods: {
      changeSelectNumber(number) {
        this.selectedNumber = number;
      },
      rotateArrow() {
        this.rotation += 180;
      },
    },
  };
  </script>
  
  <style scoped lang="less">
  .bet-card {
    background: linear-gradient(180deg, #f0f2f7 0%, #f4dada 100%);
    margin-bottom: 5px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    .bet-title {
      color: #CFD1FF;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      margin-left: 5px;
      margin-bottom: 3px;
      font-size: 12px;
      font-weight: 400;
    }
  }
  .bet-content {
    width: 100%;
  }
  .number {
    display: flex;
    justify-content: space-around;
    color: #5e6994;
    row-gap: 5px;
    li {
      background-color: #fff;
      width: 80px;
      height: 32px;
      border: 1px solid #facaca;
      border-radius: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      span {
        line-height: 1;
      }
      .rate {
        color: #7B85A6;
        font-size: 11px;
      }
      &.active {
        background: #f64436;
        color: #fff;
        .rate {
          color: #fff;
        }
      }
    }
  }
  </style>
  